home *** CD-ROM | disk | FTP | other *** search
/ Champak Vol A-4 / (Vol A-4) Vol. A4.iso / Games / loa_and_the_island.swf / scripts / DefineSprite_772 / frame_8 / PlaceObject2_666_322 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2008-03-17  |  722b  |  26 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.paused == false)
  3.    {
  4.       play();
  5.       if(destroy == false and _currentframe > 8)
  6.       {
  7.          gotoAndStop(1);
  8.       }
  9.       if(destroy == false and (this.hitTest(_root.level.sprite._x + _root.level._x,_root.level.sprite._y + _root.level._y - 10,true) or this.hitTest(_root.level.sprite._x + _root.level._x,_root.level.sprite._y + _root.level._y - 50,true)))
  10.       {
  11.          _global.health += _global.maxhealth / 10;
  12.          destroy = true;
  13.          gotoAndStop(10);
  14.       }
  15.       if(_currentframe == _totalframes)
  16.       {
  17.          this.swapDepths(0);
  18.          removeMovieClip(this);
  19.       }
  20.    }
  21.    if(_root.paused == true)
  22.    {
  23.       stop();
  24.    }
  25. }
  26.